package com.jf.cloud.api.delivery.feign;

import com.jf.cloud.api.delivery.vo.SameCityVO;
import com.jf.cloud.common.feign.FeignInsideAuthConfig;
import com.jf.cloud.common.response.ServerResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "jfcloud-delivery",contextId ="same-city")
public interface SameCityFeignClient {

    /**
     * 清除同城配送坐标数据
     * @param shopId
     * @return
     */
    @GetMapping(value = FeignInsideAuthConfig.FEIGN_URL_PREFIX + "/insider/sameCity/clearPositionInfo")
    ServerResponseEntity<Void> clearPositionInfo(@RequestParam("shopId") Long shopId);

    /**
     * 根据店铺id获取同城配送设置
     * @param shopId
     * @return
     */
    @GetMapping(value = FeignInsideAuthConfig.FEIGN_URL_PREFIX + "/insider/sameCity/getSameCityByShopId")
    ServerResponseEntity<SameCityVO> getSameCityByShopId(@RequestParam("shopId") Long shopId);
}
